package topevery.syn.data.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import topevery.syn.data.model.codec.ModelTypeEnumCodec;

import java.time.LocalDateTime;

@Data
public class WaterData implements IGlbModel {

    @JSONField(name = "a")
    public Long gid;

    @JSONField(name = "b" ,serializeUsing = ModelTypeEnumCodec.class, deserializeUsing = ModelTypeEnumCodec.class)
    public ModelTypeEnum modelType = ModelTypeEnum.Water;

    @Override
    public Long getGid() {
        return gid;
    }

    @Override
    public void setGid(Long gid) {
        this.gid = gid;
    }

    @Override
    public ModelTypeEnum getModelType() {
        return modelType;
    }

    @Override
    public void setModelType(ModelTypeEnum modelType) {
        this.modelType = modelType;
    }

    @JSONField(name = "d")
    public Long fid;

    @JSONField(name = "e")
    public String clientKey;
    @JSONField(name = "f")
    public String clientIp;
    @JSONField(name = "g")
    public Integer clientIpPort;

    @JSONField(name = "h")
    public LocalDateTime dbCreateDate;

    @JSONField(name = "i")
    public Double lng;
    @JSONField(name = "j")
    public Double lat;

    /// <summary>
    /// 摩卡托lng
    /// </summary>
    @JSONField(name = "k")
    public Double lngMct;
    /// <summary>
    /// 摩卡托lat
    /// </summary>
    @JSONField(name = "l")
    public Double latMct;

    /// <summary>
    /// 百度lng
    /// </summary>
    @JSONField(name = "m")
    public Double lngBd;
    /// <summary>
    /// 百度lat
    /// </summary>
    @JSONField(name = "n")
    public Double latBd;

    /// <summary>
    /// 位置时间
    /// </summary>
    @JSONField(name = "o")
    public LocalDateTime posDate;

    /// <summary>
    /// 方位
    /// </summary>
    @JSONField(name = "p")
    public Integer direction;

    /// <summary>
    /// 速度
    /// </summary>
    @JSONField(name = "q")
    public Double speed;

    public  Integer starNumber;
    public  Integer starNumberBd;
    public  Double gnssValue;
    public  Integer alarmFlag;

    /// <summary>
    /// 实时流量
    /// </summary>
    @JSONField(name = "r")
    public Double realtimeFlow;
    /// <summary>
    /// 总流量
    /// </summary>
    @JSONField(name = "s")
    public Double countFlow;
    /// <summary>
    /// 加速度x轴
    /// </summary>
    @JSONField(name = "t")
    public Double upspeedX;
    /// <summary>
    /// 加速度y轴
    /// </summary>
    @JSONField(name = "u")
    public Double upspeedY;
    /// <summary>
    /// 加速度z轴
    /// </summary>
    @JSONField(name = "v")
    public Double upspeedZ;
    /// <summary>
    /// 电子罗盘x轴
    /// </summary>
    @JSONField(name = "w")
    public Double compassX;
    /// <summary>
    /// 电子罗盘y轴
    /// </summary>
    @JSONField(name = "x")
    public Double compassY;
    /// <summary>
    /// 电子罗盘z轴
    /// </summary>
    @JSONField(name = "y")
    public Double compassZ;

    public  String serviceIp;
    public  Integer servicePort;

    @Override
    public String getGlbModelKey() {
        return clientKey;
    }
}
